package com.huishu.order;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;


@Slf4j
@EnableFeignClients
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@MapperScan("com.huishu.order.mapper")
@ComponentScan("com.huishu")
@EnableScheduling
public class OrderServerApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(OrderServerApplication.class, args);
        String uri = applicationContext.getEnvironment().getProperty("spring.redis.host");
        String port = applicationContext.getEnvironment().getProperty("spring.redis.port");
        log.info(uri + ":" + port);
    }

}
